#include "junix.h"
using namespace std;

struct A
{
	A(int n=1000):i(n),q(66){ }

	friend void print( const A& a)
	{
		cout<<a.i<<" "<<a.q<<endl;
	}

		int q;
	private:
		int i;
};

struct B:A{
	B():j(100){
		A::q = 99;
	}

private:
	int j;
	using A::q;
};

int main(int argc, char **argv)
{
	A a(1000);
	print(a);
	B b;
	print(b);
}
